<?php
$this->breadcrumbs=array(
	'Members Report',
);
if ( !isset($_GET['year']) ) {
  $p_year = date("Y"); 	
}
else  {
  $p_year = $_GET['year'];	
}
?>
<style>
	#GetReport{

	}
</style>
<h1>Member List</h1>
<form method="post">
	Export Members for the month : 
	<select name="month">
		<option value="1" selected="selected">Jan</option>
		<option value="2" >Feb</option>
		<option value="3" >Mar</option>
		<option value="4" >Apr</option>
		<option value="5" >May</option>
		<option value="6" >Jun</option>
		<option value="7" >Jul</option>
		<option value="8" >Aug</option>
		<option value="9" >Sep</option>
		<option value="10" >Oct</option>
		<option value="11" >Nov</option>
		<option value="12" >Dec</option>
	</select>&nbsp;
	<select name="year">
		<?php 
		  $year_start = 2012;
          $year_now = date("Y");
          $year = $year_now;
		  while ( $year >= $year_start ) { 
		  	 if ( $year == $p_year) {?>		
		        <option value="<?php echo $year?>" selected="selected"> <?php echo $year?></option>
		     <?php } else { ?>
		     	<option value="<?php echo $year?>"> <?php echo $year?></option>
		     <?php } ?>
		<?php $year--; }?>
	</select>
	&nbsp;&nbsp;<input type="submit" name="GetReport" id="GetReport" value="Get Report"/>
	<br/><br/><a href="<?php echo Yii::app()->request->baseUrl;?>?r=MembersReport/excelMemberReport">Export All Members</a>
</form>